package top.yangyitao.dto;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import top.yangyitao.entity.User;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class MemberDto {
	long id;
	String nickname;
	String headImg;
	String phone;
	
	public MemberDto convert(User user) {
		setId(user.getId());
		setNickname(user.getNickname());
		setHeadImg(user.getHeadImg());
		setPhone(user.getPhone());
		return this;
	}
}
